import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: {
      name: 'Home'
    }
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/other',
    name: 'Other',
    component: () => import(/* webpackChunkName: "other" */ '../views/Other.vue')
  },
  {
    path: '/personal',
    name: 'Personal',
    component: () => import(/* webpackChunkName: "personal" */ '../views/Personal.vue')
  },
  {
    path: '/homechildren',
    name: 'HomeChildren',
    component: () => import(/* webpackChunkName: "homechildren" */ '../views/HomeChildren.vue')
  },
  {
    path: '/homebanner',
    name: 'Homebanner',
    component: () => import(/* webpackChunkName: "homebanner" */ '../views/Homebanner.vue')
  },
  {
    path: '/homehospital',
    name: 'homehospital',
    component: () => import(/* webpackChunkName: "homehospital" */ '../views/homehospital.vue')
  },
  {
    path: '/page',
    name: 'page',
    component: () => import(/* webpackChunkName: "page" */ '../views/xiala/index.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import(/* webpackChunkName: "search" */ '../views/ceshi.vue')
  },
  {
    path: '/searchpage',
    name: 'searchpage',
    component: () => import(/* webpackChunkName: "search" */ '../views/search/index.vue')
  },
  {
    path: '/filepage',
    name: 'filepage',
    component: () => import(/* webpackChunkName: "search" */ '../views/file/baogao.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "search" */ '../views/login/login.vue')
  },
  {
    path: '/videopage',
    name: 'videopage',
    component:() => import(/* webpackChunkName: "videopage" */ '../views/video/index.vue')
  },
  { //练习题有倒计时功能
    path: '/exercises',
    name: 'exercises',
    component:() => import(/* webpackChunkName: "exercises" */ '../views/video/exercises.vue')
  },
  { //练习题有倒计时功能
    path: '/ceshi',
    name: 'ceshi',
    component:() => import(/* webpackChunkName: "exercises" */ '../views/video/ceshi.vue')
  },
  {
    path: '/userinfo',
    name: 'userinfo',
    component:() => import(/* webpackChunkName: "videopage" */ '../views/userinfo/index.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})


export default router
